package com.uu.custom.yingbang.facade.restful.controller;

import com.uu.custom.yingbang.facade.restful.service.TrackingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.uu.skull.log.annotation.ControllerLog;
import org.uu.skull.result.Result;
import org.uu.skull.validate.group.IDGroup;


/**
 * @Author LiuKe
 * @Date 2017/9/19 23:24
 */
@RestController
@RequestMapping("tracking")
@ControllerLog
public class TrackingController {

    @Autowired
    private TrackingService trackingService;
    /**
     * 查询订单
     * @param trackingNumbers
     * @return String
     */
    @RequestMapping(value = "/getInfo", method = RequestMethod.POST)
    public Result getInfo(@RequestBody @Validated({IDGroup.class}) String trackingNumbers , BindingResult bindingResult) {

        return trackingService.getInfo(trackingNumbers);
    }
}
